<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title></title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="/template/pc1/images/wmh_favicon.ico">
    <link href="${base}/res/plugins/hplus/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${base}/res/plugins/hplus/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="${base}/res/plugins/hplus/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="${base}/res/plugins/hplus/css/animate.css" rel="stylesheet">
    <link href="${base}/res/plugins/hplus/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="${base}/res/plugins/hplus/css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="${base}/res/css/common.css" rel="stylesheet" type="text/css" />
    <style>
        .loading{
            width: 20px;
        }
    </style>
</head>

<body class="white-bg">
<div class="path">
    财务管理 &raquo; 奖金统计
</div>

<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                    <h1 class="no-margins allTotalAmount"><img class="loading" src="/res/img/loading.gif" /></h1>
                    <small>总营业额</small>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                    <h1 class="no-margins total"><img class="loading" src="/res/img/loading.gif" /></h1>
                    <small>总奖金</small>
            </div>
        </div>
        <div class="col-sm-2">
            <div class="ibox float-e-margins">
                    <h1 class="no-margins totalHasDrawNum"><img class="loading" src="/res/img/loading.gif" /></h1>
                    <small>已提现奖金</small>
            </div>
        </div>
        <div class="col-sm-2">
            <div class="ibox float-e-margins">
                    <h1 class="no-margins totalAvail"><img class="loading" src="/res/img/loading.gif" /></h1>
                    <small>未提现可用奖金</small>
            </div>
        </div>
        <div class="col-sm-2">
            <div class="ibox float-e-margins">
                    <h1 class="no-margins totalFreeze"><img class="loading" src="/res/img/loading.gif" /></h1>
                    <small>冻结奖金</small>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12" >
            <table id="cpTableEvents" data-toggle="table" data-mobile-responsive="true">
                <thead>
                <tr>
                    <th data-field="username">昵称</th>
                    <th data-field="realname">姓名</th>
                    <th data-field="code">会员编号</th>
                    <th data-field="phone">联系方式</th>
                    <th data-field="total">总金额</th>
                    <th data-field="availNum" >可用金额</th>
                    <th data-field="freezeNum" >冻结金额</th>
                    <th data-field="hasDrawNum">已提现金额</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
<script src="${base}/res/plugins/hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="${base}/res/plugins/hplus/js/bootstrap.min.js?v=3.3.6"></script>
<script src="${base}/res/plugins/hplus/js/content.js?v=1.0.0"></script>
<script src="${base}/res/plugins/hplus/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="${base}/res/plugins/hplus/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="${base}/res/plugins/hplus/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="${base}https://static.9hive.cn/global/vendor/layer/layer.js"></script>
<script src="${base}/res/plugins/hplus/js/plugins/toastr/toastr.min.js"></script>

<script>

    /*function availNumFormmater(value, row, index) {
        var t = parseFloat(value)-parseFloat(row.hasDrawNum);
        if(t<0){
            return 0;
        }
        return t;
    }*/

    /*function freezeNumFormmater(value, row, index){
        if(parseFloat(row.freezeNum)+parseFloat(row.hasDrawNum)-parseFloat(row.total)>0)
            return 0 ;
        else
            return value;
    }*/
    
    (function() {

        $('#cpTableEvents').bootstrapTable({
            url: "${base}/shop/rewards/ajaxpersonlist",
            search: true,
            pagination: true,
            showRefresh: true,
            showToggle: true,
            showColumns: true,
            iconSize: 'outline',
            toolbar: '#eventsToolbar',
            icons: {
                refresh: 'glyphicon-repeat',
                toggle: 'glyphicon-list-alt',
                columns: 'glyphicon-list'
            },
            responseHandler:function (res) {
                $('.total').html(res.total+"(元)");
                $('.allTotalAmount').html(res.allTotalAmount+"(元)");
                $('.totalAvail').html(res.totalAvail+"(元)");
                $('.totalFreeze').html(res.totalFreeze+"(元)");
                $('.totalHasDrawNum').html(res.totalHasDrawNum+"(元)");
                return res.data;
            }
        });

    })();
</script>
</body>

</html>
